function [ patrones ] = generadorDePatrones2( xDesde, xHasta, xDelta, yDesde, yHasta, yDelta)

% x=0 y=-1.6 montana
% x=0 y=1.6  r=1
% 
% x=1.3 y=0 lago
% x=-1.3 y=0   r=0.7
% 
% x=0 y=0 centro
% r=0.4

xCant = ((xHasta-xDesde)/xDelta)+1;
yCant = ((yHasta-yDesde)/yDelta)+1;
patrones = zeros(70, 3);
k=1;

corrExp = 0;

xDelta = xDelta /10;
yDelta = yDelta /10;

%patrones base
i = xDesde;

while i < xHasta
    
   i = i + xDelta*50;
    
    j=yDesde;
    
    while j < yHasta
        
        patrones(k,1) = i + corrExp;
        patrones(k,2) = j + corrExp;
        patrones(k,3) = funcion7(i,j);
        k=k+1;
        j = j + yDelta*50;
   end
end

%bordes

doneX = 0;
doneY = 0;

i = xDesde;

while i < xHasta
    
    i = i + xDelta*35;
    
    j=yDesde;
    
    while j < yHasta
        
        if i >= 2.5 && i <= 3
                j = j + yDelta*35;
                doneY = 1;
        end
        
        if i >= -3 && i <= -2.5 && doneY == 0
                j = j + yDelta*35;
                doneY = 1;
        end
        
        if j >= 2.5 && j <= 3 && doneY == 0
                j = j + yDelta*35;
                doneY = 1;
        end
        
        if j >= -3 && j <= -2.5 && doneY == 0
                j = j + yDelta*35;
                doneY = 1;
        end
        
        if doneY == 1
            patrones(k,1) = i + corrExp;
            patrones(k,2) = j + corrExp;
            patrones(k,3) = funcion7(i,j);
            k=k+1;
            doneY = 0;
        else
            j = j + yDelta*35;
        end
   end
end

%zonas grandes

doneX = 0;
doneY = 0;

i = xDesde;

while i < xHasta
    
    if i >= -0.9 && i <= 0.9
            i = i + xDelta*15;
            doneX = 1;
    end
    
    if i >= -2 && i <= -0.9
            i = i + xDelta*15;
            doneX = 1;
    end

    if i >= 0.9 && i <= 2
            i = i + xDelta*15;
            doneX = 1;
    end
    
    if doneX == 0
        i = i + xDelta*15;
        %aca salteo el while en Y
        continue;
    else
        doneX = 0;
    end
    
    j=yDesde;
    
    while j < yHasta
        
        if i >= -0.9 && i <= 0.9 && j >= -2.3 && j <= -0.9
                j = j + yDelta*15;
                doneY = 1;
        end
        
        if i >= -0.9 && i <= 0.9 && j >= 0.9 && j <= 2.3
                j = j + yDelta*15;
                doneY = 1;
        end
        
        if i >= -2 && i <= -0.9 && j >= -0.6 && j <= 0.9
                j = j + yDelta*15;
                doneY = 1;
        end
        
        if i >= 0.9 && i <= 2 && j >= -0.6 && j <= 0.9
                j = j + yDelta*15;
                doneY = 1;
        end
        
        if doneY == 1
            patrones(k,1) = i + corrExp;
            patrones(k,2) = j + corrExp;
            patrones(k,3) = funcion7(i,j);
            k=k+1;
            doneY = 0;
        else
            j = j + yDelta*15;
        end
   end
end

%zonas pequenas

doneX = 0;
doneY = 0;

i = xDesde;

while i < xHasta
    
    if i >= -0.3 && i <= 0.3
        i = i + xDelta*6;
        doneX = 1;
    end

    if i >= -1.4 && i <= -1.2
        i = i + xDelta*6;
        doneX = 1;
    end

    if i >= 1.2 && i <= 1.4
        i = i + xDelta*6;
        doneX = 1;
    end
    
    if doneX == 0
        i = i + xDelta*15;
        %aca salteo el while en Y
        continue;
    else
        doneX = 0;
    end
    
    j=yDesde;
    
    while j < yHasta
        if i >= -0.3 && i <= 0.3 && j >= -1.8 && j <= -1.3
            j = j + yDelta*6;
            doneY = 1;
        end
        
        if i >= -0.3 && i <= 0.3 && j >= 1.3 && j <= 1.8
            j = j + yDelta*6;
            doneY = 1;
        end
        
        if i >= -1.4 && i <= -1.2 && j >= -0.1 && j <= 0.3
            j = j + yDelta*6;
            doneY = 1;
        end
        
        if i >= 1.2 && i <= 1.4 && j >= -0.1 && j <= 0.3
            j = j + yDelta*6;
            doneY = 1;
        end
        
        if doneY == 1
            patrones(k,1) = i + corrExp;
            patrones(k,2) = j + corrExp;
            patrones(k,3) = funcion7(i,j);
            k=k+1;
            doneY = 0;
        else
            j = j + yDelta*15;
        end
   end
end


patrones
end

